package com.atguigu.guli.service.base.model;

import com.baomidou.mybatisplus.annotation.FieldFill;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;
import lombok.experimental.Accessors;

import java.util.Date;

/** service 公共模块
 * @author Jia Fa
 * @create 2021-10-26 12:30
 */
@Data
@Accessors(chain = true)
public class BaseEntity {
    private String id;
    //需要自动填充的属性上标注需要自动填充的时机
    @TableField(fill = FieldFill.INSERT)
//    @JsonFormat(timezone = "GMT+8")
    private Date gmtCreate;

//    @JsonFormat(timezone = "GMT+8")
    @TableField(fill = FieldFill.INSERT_UPDATE)
    private Date gmtModified;
}
